package com.hsxc.cdz.monitor.FSM;

public interface CachePileIntf {
    // actions on status
    int SUCCESS = 0;
    int FAIL = 1;

    /**
     * 故障处理
     *
     * @return 0成功，1失败
     */
    int fault();

    /**
     * 恢复处理
     *
     * @return 0成功，1失败
     */
    int recovery();

    /**
     * 预约该桩
     *
     * @param chargePort 端口号
     * @param cardNum    用户编号
     * @param duration   预约时长
     * @return
     */
    int reserve(int chargePort, String cardNum, int duration);

    boolean confirmReserv(int port, String cardNum, String startTime);

    int reservationCancel(int port, String cardNum);

    boolean confirmReservCancelled(int port, String cardNum);

    int lock();

    int unlock();

    int chargeStart(int port, int startWay, int ctrlWay, int stopWay, double limitData, String onTimeStart, String userNO);

    boolean confirmStart(int port, int startWay, int ctrlWay, int stopWay, double limitData, String onTimeStart, String userNo);

    int chargeStop(int chargePort, int control, String userNO);

    boolean confirmStop(int port, int controll, String userNo);

    int heartBeatLost();

    int logout();

    void changeStateCharge();

    void changeStateIdle();

    void changeStateReserv();

    void changeStateLocked();

    int reboot();

    void confirmReboot();

    int collectStatus();

    void refreshUI();

    int offLine();

    int rateSetting(double oneRate, double twoRate, double threeRate, double fourRate, double serviceFee, String timeRate);

    void rateSettingConfirm();

    int queryRate();

    int queryRateConfirm();
}
